﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Snowdreamist.Collection.Tree
{
    public class BinaryTreeNode<T> : TreeNodeBase<T> where T : BinaryTreeNode<T>
    {
        protected override ITreeNodeCollection<T> CreateCollection()
        {
            return new BinaryTreeNodeCollection<T>();
        }

        public T LeftNode
        {
            get
            {
                return this.Children[0];
            }
        }

        public T RightNode
        {
            get
            {
                return this.Children[1];
            }
        }
    }
}